package com.example.demo;


import org.junit.jupiter.api.Test;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.Random;

@RestController
    public class HelloWorld {
    @Test

        @GetMapping("/random")
        public int random() {
            return new Random().nextInt(1000);
        }

        @GetMapping("/square/{number}")
        public int square(@PathVariable int number) {
            return number * number;
        }

    }

